package com.geo.geotool.entity.enmu;


/**
 * • @Description: 地理文件枚举类
 * • @author  : yell
 * • @date : 2021/12/7  10:44
 */
public enum  GeoFileTypeEnum {
    TXT(0,"txt"),
    DWG(1,"dwg"),
    SHAPE(2,"shp");
    private int code;
    private String type;
    GeoFileTypeEnum(int code,String type){
        this.code = code;
        this.type = type;
    }

    public static GeoFileTypeEnum getGeoFileType(int code){
        for(GeoFileTypeEnum geoFileTypeEnum : values()){
            if(geoFileTypeEnum.getCode() == code){
                return geoFileTypeEnum;
            }
        }
        return null;
    }
    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
